//
//  UIView+ImageScreenShot.m
//  Image
//
//  Created by kang on 2018/7/12.
//  Copyright © 2018年 fuyunhe. All rights reserved.
//

#import "UIView+ImageScreenShot.h"

@implementation UIView (ImageScreenShot)

-(UIImage *)imageScreenShot{
    
    UIGraphicsBeginImageContext(self.frame.size);
    [self.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return image;
}

@end
